const MockJS = require('mockjs')
const code = 200

exports.In = MockJS.mock({
  code,
  result: {
    err: 0,
    name: '@name',
    id: '@uuid',
    token: 'tokentokentokentokentoken'
  },
  msg: '登录成功',
})
// exports.In = MockJS.mock({
//   code: 401,
//   result: {
//     err: 1,
//   },
//   msg: '用户名或密码错误',
// })

exports.Out = {
  code,
  msg: '退出成功'
}

exports.MenuList = MockJS.mock({
  code,
  result: [
    { path: '/', name: '首页' },
    { path: '/info/me', name: '个人信息查询' },
    { path: '/wage', name: '个人薪资查询' },
    { path: '/punch', name: '考勤查询' },
    { path: '/performance', name: '绩效管理' },
    {
      path: '/apply',
      name: '流程申请',
      children: [
        {path: '/apply/add', name: '申请流程'},
        {path: '/apply/draft', name: '申请草稿'},
      ]
    }
  ]
})
